/**
 * Polydrom Examples
 * @author yevgenis
 *
 */
import java.util.Scanner;
public class Polydrom {
	
	public static void main(String[] ARGC)
	{
		//int Arr1[] = new int[3];
		int Arr1[] = {10,4,2,1,2,2,4,10};
		
		
		if ( isPolydrom(Arr1))
		{
			System.out.println("This Arr Is Poly!!");
			
		}
		
	}
	
	
	//Check the give array of strings is polydrom
	public static boolean isPolydrom(int[] arr)
	{
		boolean isPolydrom = true;
		
		int idxAsc=0;
		int idxDesc=arr.length-1;
		
		while ( idxAsc<idxDesc && isPolydrom)
		{
			if(arr[idxAsc] != arr[idxDesc])
		
			{
				isPolydrom=false;
			}
			
			idxAsc++;
			idxDesc--;
		
		
		}
		
		
		return isPolydrom;
		
	}

}
